package com.crowntit.domain.order.adapter.repository;

import com.crowntit.domain.order.model.aggregate.CreateOrderAggregate;
import com.crowntit.domain.order.model.entity.*;

import java.util.List;

public interface IOrderRepository {
    void doSaveOrder(CreateOrderAggregate payOrder);

    OrderEntity queryUnPayOrder(ShopCartEntity shopCart);

    void updateOrderPayInfo(PayOrderEntity payOrder);

    void updateOrderGroupBuyInfo(OrderEntity payOrder) throws Exception;

    void changeOrderPaySuccess(OrderPaySuccessEntity paySuccessEntity);

    void changeOrderGroupBuyStatus(GroupBuySettlementInfoEntity settlementInfoEntity);

    GroupBuyStatusEntity queryOrderGroupBuyStatusByOrderId(String orderId);

    List<String> queryTimeoutCloseOrder();

    List<String> queryNoPayNotifyOrder();

    boolean changeOrderClose(String orderId);

    void changeGroupBuyOrdersStatus(GroupBuyNotifyEntity groupBuyNotifyEntity) throws Exception;

}
